import Vue from 'vue'

import VueRouter from 'vue-router'
Vue.use(VueRouter)

import './lib/mui/dist/css/mui.css'
import './lib/mui/dist/css/icons-extra.css'

import MintUI from 'mint-ui'
import 'mint-ui/lib/style.css'
import app from './App.vue'

Vue.use(MintUI)

import moment from 'moment'

// 导入vue-resource包
import vueResource from 'vue-resource'
Vue.use(vueResource)
// 全局设置vue-resource请求的根域名
Vue.http.options.root="http://localhost:8080";
// 全局启用emulateJSON:true选项
Vue.http.options.emulateJSON=true;

// 导入 vue-preview
import VuePreview from 'vue-preview'
Vue.use(VuePreview)

Vue.filter('dateFormat',function (dataStr, pattern='YYYY-MM-DD HH:mm:ss') {
    return moment(dataStr).format(pattern)
})

// import { Swipe, SwipeItem, Button} from 'mint-ui';
// import { Header } from 'mint-ui'
// import 'mint-ui/lib/style.css'

// Vue.component(Swipe.name, Swipe);
// Vue.component(SwipeItem.name, SwipeItem);
// Vue.component(Header.name, Header);
// Vue.component(Button.name, Button)

import router from './router.js'

new Vue({
    el: '#app',
    render: c => c(app),
    router,
})